<?php

/**
 * BoletinAlumno form base class.
 *
 * @method BoletinAlumno getObject() Returns the current form's model object
 *
 * @package    ecampus
 * @subpackage form
 * @author     Grupo 608
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseBoletinAlumnoForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_alumno'       => new sfWidgetFormInputHidden(),
      'anio'            => new sfWidgetFormInputHidden(),
      'id_curso'        => new sfWidgetFormInputHidden(),
      'nota_trimestre1' => new sfWidgetFormInputText(),
      'nota_trimestre2' => new sfWidgetFormInputText(),
      'nota_trimestre3' => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id_alumno'       => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id_alumno')), 'empty_value' => $this->getObject()->get('id_alumno'), 'required' => false)),
      'anio'            => new sfValidatorChoice(array('choices' => array($this->getObject()->get('anio')), 'empty_value' => $this->getObject()->get('anio'), 'required' => false)),
      'id_curso'        => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id_curso')), 'empty_value' => $this->getObject()->get('id_curso'), 'required' => false)),
      'nota_trimestre1' => new sfValidatorNumber(array('required' => false)),
      'nota_trimestre2' => new sfValidatorNumber(array('required' => false)),
      'nota_trimestre3' => new sfValidatorNumber(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('boletin_alumno[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'BoletinAlumno';
  }

}
